package jicheng1;

public class Car {
    private String brand;
    private String color;
    private String chepai;

    public Car(String brand, String color, String chepai) {
        this.brand = brand;
        this.color = color;
        this.chepai = chepai;
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public String getChepai() {
        return chepai;
    }

    public void setChepai(String chepai) {
        this.chepai = chepai;
    }
    public void print(){
        System.out.println("车辆类型"+brand+"车辆颜色"+color+"车牌号"+chepai);
    }

    public void start() {
        System.out.println(brand + "车点火，启动");
    }

    public void speed(){
        System.out.println(brand+"车开始直线加速");
    }
    public void brake(){
        System.out.println(brand+"车子遇到红灯，刹车减速");
    }


}